import service from '../plugins/fetch';

const api = '/api'

// 提交注册
export function postRegister(params){
    return service({
        method: 'POST',
        data: params,
        url:  api + '/user/register',
    }).then(res => res.data)
}

// 发送验证码
export function postSendVercode(params){
    return service({
        method: 'POST',
        data: params,
        url:  api + '/mailer/sendVerCode',
    }).then(res => res.data)
}

// 发送验证码
export function postLogin(params){
    return service({
        method: 'POST',
        data: params,
        url:  api + '/user/login',
    }).then(res => res.data)
}

// 查找用户喜欢（收藏）
export function findVideoListLiked(params){
    return service({
        method: 'POST',
        data: params,
        url:  api + '/user/findVideoListLiked',
    }).then(res => res.data)
}